
# core compiling options
CXX = @CXX@

CXX_STD = @CXX_STD@
OPT_FLAGS = @STATS_WARN_FLAGS@ @STATS_OPT_FLAGS@

STATS_MATLIB_FLAGS = @STATS_MATLIB_FLAGS@
STATS_MATLIB_PATH = @STATS_MATLIB_PATH@

# source directories
STATS_HEADER_DIR = @STATS_INSTALL_INCLUDE_PATH@
STATS_TEST_DIR = .

# general flags
CXXFLAGS = $(CXX_STD) $(OPT_FLAGS) $(STATS_MATLIB_FLAGS) -I$(STATS_MATLIB_PATH) -I@GCEM_INCLUDE_PATH@ -I$(STATS_HEADER_DIR)
LIBS= @STATS_BLAS_LAPACK@

# Stats Test Files
SOURCES_STATS := $(shell find $(STATS_TEST_DIR) -name '*.cpp')
OBJECTS_STATS := $(addprefix $(STATS_TEST_DIR)/,$(SOURCES_STATS:%.cpp=%.test))

all: $(OBJECTS_STATS)

$(STATS_TEST_DIR)/%.test: $(STATS_TEST_DIR)/%.cpp
	$(CXX) $(CXXFLAGS) $< -o $@ $(LIBS)

# cleanup and install
.PHONY: clean
clean:
	@rm -rf *.so ./*.gcov ./*.gcno ./*.gcda ./*.dSYM ./*.test
